activate_and_send_email = function(pk) {
    $('input[name="_selected_action"]').removeAttr('checked');
    $('input[name="_selected_action"][value="{}"]'.replace('{}', pk)).attr('checked', 'checked');
    $('select[name="action"]').val('activate_account_and_send_email');
    $('button[type="submit"][name="index"]').click();
  };